package com.example.s202404024;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/Demo1")
public class Demo1 {

    @RequestMapping("/test")
    public String test(Integer age) {
        return "接收到的参数age：" + age;
    }

    @RequestMapping("/test2")
    public String test2(String name, Integer age) {
        return "接收到的参数name：" + name + "  接收到的参数age：" + age;
    }

    @RequestMapping("test3")
    public Object test3(Student student) {
        return student.toString();
    }
}
